import Http from '@/common/http'

export default {

  getCategories: () => Http.get('/course/categories'),

  getList: (params = {}) => Http.get('/course/list', params),

  getInfo: id => Http.get(`/course/${id}/info`),

  getChapters: id => Http.get(`/course/${id}/chapters`),

  getPackages: id => Http.get(`/course/${id}/packages`),

  getReviews: (id, params = {}) => Http.get(`/course/${id}/reviews`, params),

  getConsults: (id, params = {}) => Http.get(`/course/${id}/consults`, params),

  favorite: id => Http.post(`/course/${id}/favorite`)

}
